{include file="public/nheader"}
<div class="layui-fluid layui-bg-white">
    <form action="{:url()}" class="layui-form layui-form-fixed">
        <div class="layui-form-item">
            <label class="layui-form-label">
                <font color="red">* </font>需可用消费金额
            </label>
            <div class="layui-input-block">
                <input type="number" id="getmoney" name="getmoney" required="" lay-verify="required" autocomplete="off"
                    class="layui-input" value="{$row.getmoney|default='0'}" placeholder="">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <font color="red">* </font>券金额
            </label>
            <div class="layui-input-block">
                <input type="number" id="money" name="money" required="" lay-verify="required" autocomplete="off"
                    class="layui-input" value="{$row.money|default='1'}" placeholder="">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <font color="red">* </font>有效期天数
            </label>
            <div class="layui-input-block">
                <input type="number" id="days" name="days" required="" lay-verify="required" autocomplete="off"
                    class="layui-input" value="{$row.days|default='0'}" placeholder="">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <font color="red">* </font>文本说明
            </label>
            <div class="layui-input-block">
                <input type="text" id="text" name="text" required="" lay-verify="required" autocomplete="off"
                    class="layui-input" value="{$row.text|default='本券只适用于适用区域，最终解释权归平台所有'}" placeholder="">
            </div>
        </div>
        <div class="layui-footer layui-form-item layui-center ">
            <input type="hidden" value="{$id|default='0'}" name="user_id" />
            <button class="layui-btn" lay-filter="submitIframe" type="button" lay-submit>提交</button>
            <button class="layui-btn layui-btn-primary" type="button" sa-event="closeDialog">取消</button>
        </div>
    </form>
</div>
{include file="public/nfooter"}
<script>
    layui.use(['form', 'layer'], function () {
        $ = layui.jquery;
        var form = layui.form
            , layer = layui.layer;
        form.on('radio(type)', function (data) {
            var type = data.value;
            if (type == 1) {
                $('#agentshow').hide();
            }
            if (type == 2) {
                $('#agentshow').show();
            }
        });
    });
</script>